<?php

/**
 * Class documentslog(文档下载记录)
 * Notes:
 * Author lv
 * Email 578530370@qq.com
 * Date 2020/8/4 9:01
 */
class documentslogClassModel extends Model
{
    public function initModel()
    {
        $this->settable('zbcg_documents_download_log');
    }

    public function add($optid, $docId)
    {
        $info = m('admin')->getone('id='.$optid, 'name');
        $param = array(
            'optname' => $info['name'],
            'optid' => $optid,
            'doc_id' => $docId,
            'ip' => $this->rock->ip,
            'create_time' => date('Y-m-d H:i:s')
        );
        return $this->insert($param);
    }
}